SlideShare a Scribd company logo
Class No.24  Data Structures http://ecomputernotes.com
Huffman Encoding Huffman code is method for the compression for standard text documents. It makes use of a binary tree to develop codes of varying lengths for the letters used in the original message.  Huffman code is also part of the JPEG image compression scheme. The algorithm was introduced by David Huffman in 1952 as part of a course assignment at MIT. http://ecomputernotes.com
Huffman Encoding To understand Huffman encoding, it is best to use a simple example.  Encoding the 32-character phrase: " traversing threaded binary trees ",  If we send the phrase as a message in a network using standard 8-bit ASCII codes, we would have to send 8*32= 256 bits. Using the Huffman algorithm, we can send the message with only 116 bits. http://ecomputernotes.com
Huffman Encoding List all the letters used, including the "space" character, along with the frequency with which they occur in the message.  Consider each of these (character,frequency) pairs to be nodes; they are actually leaf nodes, as we will see.  Pick the two nodes with the lowest frequency, and if there is a tie, pick randomly amongst those with equal frequencies.  http://ecomputernotes.com
Huffman Encoding Make a new node out of these two, and make the two nodes its children.  This new node is assigned the sum of the frequencies of its children.  Continue the process of combining the two nodes of lowest frequency until only one node, the root, remains.  http://ecomputernotes.com
Huffman Encoding Original text:  traversing threaded binary trees size: 33 characters (space and newline) NL : 1 SP : 3 a : 3 b : 1 d : 2 e : 5 g : 1 h : 1 i : 2 n : 2 r : 5 s : 2 t : 3 v : 1 y : 1 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 is equal to sum  of the frequencies of  the two children nodes. http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 There a number of ways to combine nodes. We have chosen just one such way. http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 4 4 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 6 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 9 10 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 http://ecomputernotes.com
Huffman Encoding List all the letters used, including the "space" character, along with the frequency with which they occur in the message.  Consider each of these (character,frequency) pairs to be nodes; they are actually leaf nodes, as we will see.  Pick the two nodes with the lowest frequency, and if there is a tie, pick randomly amongst those with equal frequencies.  http://ecomputernotes.com
Huffman Encoding Make a new node out of these two, and make the two nodes its children.  This new node is assigned the sum of the frequencies of its children.  Continue the process of combining the two nodes of lowest frequency until only one node, the root, remains.  http://ecomputernotes.com
Huffman Encoding Start at the root. Assign 0 to left branch and 1 to the right branch. Repeat the process down the left and right subtrees. To get the code for a character, traverse the tree from the root to the character leaf node and read off the 0 and 1 along the path. http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 http://ecomputernotes.com
Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 http://ecomputernotes.com
Huffman Encoding Huffman character codes NL  10000 SP  1111 a  000 b  10001 d  0100 e  101 g  10010 h  10011 i  0101 n  0110 r  110 s  0111 t  001 v  11100 y  11101 Notice that the code is variable length. Letters with higher frequencies have shorter codes. The tree could have been built in a number of ways; each would yielded different codes but the code would still be minimal. http://ecomputernotes.com
Huffman Encoding Original:  traversing threaded binary trees Encoded: 001110000111001011100111010101101001011110011001111010100001001010100111110000101011000011011101111100111010110101110000 t r a v e http://ecomputernotes.com
Huffman Encoding Original:  traversing threaded binary trees With 8 bits per character, length is 264. Encoded: 001110000111001011100111010101101001011110011001111010100001001010100111110000101011000011011101111100111010110101110000 Compressed into 122 bits, 54% reduction. http://ecomputernotes.com
Mathematical Properties of Binary Trees http://ecomputernotes.com
Properties of Binary Tree Property:  A binary tree with N internal nodes has N+1 external nodes. http://ecomputernotes.com
Properties of Binary Tree A binary tree with N internal nodes has N+1 external nodes. D F B C G A E F E internal nodes: 9 external nodes: 10 external node internal node http://ecomputernotes.com
Properties of Binary Tree Property:  A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. http://ecomputernotes.com
Threaded Binary Tree Property:  A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. D F B C G A E F E Internal links: 8 External links: 10 external link internal link http://ecomputernotes.com
Properties of Binary Tree Property:  A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. In every rooted tree, each node, except the root, has a unique parent. Every link connects a node to its parent, so there are  N -1 links connecting internal nodes. Similarly, each of the  N +1 external nodes has one link to its parent. Thus  N -1+ N +1=2 N  links. http://ecomputernotes.com

More Related Content

PPT
computer notes - Data Structures - 16
PPT
computer notes - Data Structures - 15
PPT
computer notes - Data Structures - 3
PPT
computer notes - Data Structures - 10
PPT
computer notes - Data Structures - 29
PPT
computer notes - Data Structures - 26
PPT
computer notes - Data Structures - 22
PPT
computer notes - Data Structures - 11
computer notes - Data Structures - 16
computer notes - Data Structures - 15
computer notes - Data Structures - 3
computer notes - Data Structures - 10
computer notes - Data Structures - 29
computer notes - Data Structures - 26
computer notes - Data Structures - 22
computer notes - Data Structures - 11

Viewers also liked (20)

PPT
computer notes - Data Structures - 8
PPT
computer notes - Data Structures - 19
PPT
computer notes - Data Structures - 33
PPT
computer notes - Data Structures - 39
PPT
computer notes - Data Structures - 25
PPT
computer notes - Data Structures - 2
PPT
computer notes - Data Structures - 1
PPT
computer notes - Data Structures - 9
PPT
computer notes - Data Structures - 31
PPT
computer notes - Data Structures - 27
PPT
computer notes - Data Structures - 35
PPT
computer notes - Data Structures - 18
PPT
computer notes - Data Structures - 32
PPT
computer notes - Data Structures - 37
PPT
computer notes - Data Structures - 36
PPT
computer notes - Data Structures - 6
PPT
computer notes - Data Structures - 21
PDF
computer notes - Deleting a node
PPT
computer notes - Data Structures - 23
PPT
computer notes - Data Structures - 38
computer notes - Data Structures - 8
computer notes - Data Structures - 19
computer notes - Data Structures - 33
computer notes - Data Structures - 39
computer notes - Data Structures - 25
computer notes - Data Structures - 2
computer notes - Data Structures - 1
computer notes - Data Structures - 9
computer notes - Data Structures - 31
computer notes - Data Structures - 27
computer notes - Data Structures - 35
computer notes - Data Structures - 18
computer notes - Data Structures - 32
computer notes - Data Structures - 37
computer notes - Data Structures - 36
computer notes - Data Structures - 6
computer notes - Data Structures - 21
computer notes - Deleting a node
computer notes - Data Structures - 23
computer notes - Data Structures - 38
Ad

Similar to computer notes - Data Structures - 24 (20)

PPT
Computer notes - Expression Tree
PPT
Huffman coding presentation Sukkur iba.ppt
PPTX
Huffman.pptx
PPT
Huffman > Data Structures & Algorithums
PPT
Huffman Tree And Its Application
PPTX
Huffman tree
PPT
Data Structure and Algorithms Huffman Coding Algorithm
PDF
Huffman Encoding Pr
PPTX
Data structures' project
PDF
LEC 7-DS ALGO(expression and huffman).pdf
PPTX
Huffman Codes
PPT
Greedy Algorithms Huffman Coding.ppt
PDF
CS-102 Data Structures huffman coding.pdf
PPT
Huffman Coding.ppt
DOC
HuffmanCoding01.doc
DOC
Huffman coding01
PPTX
5c. huffman coding using greedy technique.pptx
PPT
PPT
PPT
Huffman 2
Computer notes - Expression Tree
Huffman coding presentation Sukkur iba.ppt
Huffman.pptx
Huffman > Data Structures & Algorithums
Huffman Tree And Its Application
Huffman tree
Data Structure and Algorithms Huffman Coding Algorithm
Huffman Encoding Pr
Data structures' project
LEC 7-DS ALGO(expression and huffman).pdf
Huffman Codes
Greedy Algorithms Huffman Coding.ppt
CS-102 Data Structures huffman coding.pdf
Huffman Coding.ppt
HuffmanCoding01.doc
Huffman coding01
5c. huffman coding using greedy technique.pptx
Huffman 2
Ad

More from ecomputernotes (18)

PPT
computer notes - Data Structures - 30
PPT
computer notes - Data Structures - 20
DOC
Computer notes - Including Constraints
DOC
Computer notes - Date time Functions
DOC
Computer notes - Subqueries
DOC
Computer notes - Other Database Objects
PPT
computer notes - Data Structures - 28
PPT
computer notes - Data Structures - 4
PPT
computer notes - Data Structures - 13
DOC
Computer notes - Advanced Subqueries
DOC
Computer notes - Aggregating Data Using Group Functions
DOC
Computer notes - Enhancements to the GROUP BY Clause
DOC
Computer notes - Manipulating Data
DOC
Computer notes - Writing Basic SQL SELECT Statements
PPT
computer notes - Data Structures - 14
PPT
computer notes - Data Structures - 5
DOC
Computer notes - Controlling User Access
DOC
Computer notes - Using SET Operator
computer notes - Data Structures - 30
computer notes - Data Structures - 20
Computer notes - Including Constraints
Computer notes - Date time Functions
Computer notes - Subqueries
Computer notes - Other Database Objects
computer notes - Data Structures - 28
computer notes - Data Structures - 4
computer notes - Data Structures - 13
Computer notes - Advanced Subqueries
Computer notes - Aggregating Data Using Group Functions
Computer notes - Enhancements to the GROUP BY Clause
Computer notes - Manipulating Data
Computer notes - Writing Basic SQL SELECT Statements
computer notes - Data Structures - 14
computer notes - Data Structures - 5
Computer notes - Controlling User Access
Computer notes - Using SET Operator

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Cloud computing and distributed systems.
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Spectroscopy.pptx food analysis technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
sap open course for s4hana steps from ECC to s4
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Electronic commerce courselecture one. Pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
Cloud computing and distributed systems.
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
MYSQL Presentation for SQL database connectivity
Spectroscopy.pptx food analysis technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
20250228 LYD VKU AI Blended-Learning.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
sap open course for s4hana steps from ECC to s4

computer notes - Data Structures - 24

  • 1. Class No.24 Data Structures http://ecomputernotes.com
  • 2. Huffman Encoding Huffman code is method for the compression for standard text documents. It makes use of a binary tree to develop codes of varying lengths for the letters used in the original message. Huffman code is also part of the JPEG image compression scheme. The algorithm was introduced by David Huffman in 1952 as part of a course assignment at MIT. http://ecomputernotes.com
  • 3. Huffman Encoding To understand Huffman encoding, it is best to use a simple example. Encoding the 32-character phrase: " traversing threaded binary trees ", If we send the phrase as a message in a network using standard 8-bit ASCII codes, we would have to send 8*32= 256 bits. Using the Huffman algorithm, we can send the message with only 116 bits. http://ecomputernotes.com
  • 4. Huffman Encoding List all the letters used, including the "space" character, along with the frequency with which they occur in the message. Consider each of these (character,frequency) pairs to be nodes; they are actually leaf nodes, as we will see. Pick the two nodes with the lowest frequency, and if there is a tie, pick randomly amongst those with equal frequencies. http://ecomputernotes.com
  • 5. Huffman Encoding Make a new node out of these two, and make the two nodes its children. This new node is assigned the sum of the frequencies of its children. Continue the process of combining the two nodes of lowest frequency until only one node, the root, remains. http://ecomputernotes.com
  • 6. Huffman Encoding Original text: traversing threaded binary trees size: 33 characters (space and newline) NL : 1 SP : 3 a : 3 b : 1 d : 2 e : 5 g : 1 h : 1 i : 2 n : 2 r : 5 s : 2 t : 3 v : 1 y : 1 http://ecomputernotes.com
  • 7. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 is equal to sum of the frequencies of the two children nodes. http://ecomputernotes.com
  • 8. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 There a number of ways to combine nodes. We have chosen just one such way. http://ecomputernotes.com
  • 9. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 http://ecomputernotes.com
  • 10. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 4 4 http://ecomputernotes.com
  • 11. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 6 http://ecomputernotes.com
  • 12. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 9 10 http://ecomputernotes.com
  • 13. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 http://ecomputernotes.com
  • 14. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 http://ecomputernotes.com
  • 15. Huffman Encoding List all the letters used, including the "space" character, along with the frequency with which they occur in the message. Consider each of these (character,frequency) pairs to be nodes; they are actually leaf nodes, as we will see. Pick the two nodes with the lowest frequency, and if there is a tie, pick randomly amongst those with equal frequencies. http://ecomputernotes.com
  • 16. Huffman Encoding Make a new node out of these two, and make the two nodes its children. This new node is assigned the sum of the frequencies of its children. Continue the process of combining the two nodes of lowest frequency until only one node, the root, remains. http://ecomputernotes.com
  • 17. Huffman Encoding Start at the root. Assign 0 to left branch and 1 to the right branch. Repeat the process down the left and right subtrees. To get the code for a character, traverse the tree from the root to the character leaf node and read off the 0 and 1 along the path. http://ecomputernotes.com
  • 18. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 http://ecomputernotes.com
  • 19. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 http://ecomputernotes.com
  • 20. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 http://ecomputernotes.com
  • 21. Huffman Encoding v 1 y 1 SP 3 r 5 h 1 e 5 g 1 b 1 NL 1 s 2 n 2 i 2 d 2 t 3 a 3 2 2 2 5 4 4 4 8 6 14 9 19 10 33 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 http://ecomputernotes.com
  • 22. Huffman Encoding Huffman character codes NL  10000 SP  1111 a  000 b  10001 d  0100 e  101 g  10010 h  10011 i  0101 n  0110 r  110 s  0111 t  001 v  11100 y  11101 Notice that the code is variable length. Letters with higher frequencies have shorter codes. The tree could have been built in a number of ways; each would yielded different codes but the code would still be minimal. http://ecomputernotes.com
  • 23. Huffman Encoding Original: traversing threaded binary trees Encoded: 001110000111001011100111010101101001011110011001111010100001001010100111110000101011000011011101111100111010110101110000 t r a v e http://ecomputernotes.com
  • 24. Huffman Encoding Original: traversing threaded binary trees With 8 bits per character, length is 264. Encoded: 001110000111001011100111010101101001011110011001111010100001001010100111110000101011000011011101111100111010110101110000 Compressed into 122 bits, 54% reduction. http://ecomputernotes.com
  • 25. Mathematical Properties of Binary Trees http://ecomputernotes.com
  • 26. Properties of Binary Tree Property: A binary tree with N internal nodes has N+1 external nodes. http://ecomputernotes.com
  • 27. Properties of Binary Tree A binary tree with N internal nodes has N+1 external nodes. D F B C G A E F E internal nodes: 9 external nodes: 10 external node internal node http://ecomputernotes.com
  • 28. Properties of Binary Tree Property: A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. http://ecomputernotes.com
  • 29. Threaded Binary Tree Property: A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. D F B C G A E F E Internal links: 8 External links: 10 external link internal link http://ecomputernotes.com
  • 30. Properties of Binary Tree Property: A binary tree with N internal nodes has 2N links: N-1 links to internal nodes and N+1 links to external nodes. In every rooted tree, each node, except the root, has a unique parent. Every link connects a node to its parent, so there are N -1 links connecting internal nodes. Similarly, each of the N +1 external nodes has one link to its parent. Thus N -1+ N +1=2 N links. http://ecomputernotes.com

Editor's Notes

  • #5: Start of Lecture 26
  • #15: End of lecture 25.
  • #28: End of lecture 26
  • #29: Start lecture 27